/************************************************************************

    bad_sectors.h

    vfs-verifier - Acorn VFS (Domesday) image verifier
    Copyright (C) 2025 Simon Inns

    This file is part of ld-decode-tools.

    This application is free software: you can redistribute it and/or
    modify it under the terms of the GNU General Public License as
    published by the Free Software Foundation, either version 3 of the
    License, or (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

************************************************************************/

#ifndef BAD_SECTORS_H
#define BAD_SECTORS_H

#include <QDebug>
#include <QFile>
#include <QVector>

class BadSectors
{
public:
    BadSectors();

    bool open(QString filename);
    void close();

    bool isSectorBad(quint32 sector) const;

private:
    QVector<quint32> m_badSectors;
    QFile m_file;
    bool m_isOpen;
};

#endif // BAD_SECTORS_H